<template>
	<view class="content">
		
		<video class="myVideo" :src="siteUrl+src"
		 loop muted show-play-btn controls objectFit="cover"></video>
			
	</view>
</template>

<script>
    var _self;
	export default{
		data(){
			return{
				siteUrl:this.websiteUrl,
				src:''	
			}
		},		
		onLoad(e){
			//console.log(e.house_id)
			this.video(e.house_id)
		},
		methods:{
			
			video($house_id){
				_self = this
				uni.request({
					url: this.websiteUrl+'/api.php/house/video',
					method: 'POST',
					header: {
						'content-type':'application/x-www-form-urlencoded',						
					},
					data: {house_id:$house_id},
					success: res => {
						if(res.data.code == 1){
							_self.src = res.data.data
						}
						
						
					},
					fail: () => {},
					complete: () => {}
				});
			}
			
			
			
			
		}
		
		
	}
</script>

<style>
	.content{
		width:100%;
		height:1300rpx;
		position:relative;
		background: #000000;
	}
	.myVideo{
		position:absolute;
		top:200rpx;
		width:100%;
		height: 500rpx;
	}
	
</style>
